package com.qingpeng.pay.activity;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.view.ViewPager;
import android.view.View;

import com.flyco.tablayout.SlidingTabLayout;
import com.qingpeng.pay.R;
import com.qingpeng.pay.base.BaseActivity;
import com.qingpeng.pay.fragment.FenPeiFragment;
import com.qingpeng.pay.fragment.PaoFenFragment;
import com.qingpeng.pay.views.TitleBar;

import java.util.ArrayList;

import butterknife.BindView;

public class QRCodeListMoneyActivity extends BaseActivity {

    @BindView(R.id.title)
    TitleBar title;
    @BindView(R.id.tablayout)
    SlidingTabLayout tablayout;
    @BindView(R.id.viewPager)
    ViewPager viewPager;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_qrcode_list_money;
    }

    @Override
    protected int getRootViewId() {
        return 0;
    }

    @Override
    protected int getRefreshId() {
        return 0;
    }

    @Override
    protected int getListViewId() {
        return 0;
    }

    @Override
    protected void initView(Bundle savedInstanceState) {
        title.getLlLeft().setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        String[] strings = {"分配", "跑分"};
        ArrayList<Fragment> mFragments = new ArrayList<>();
        mFragments.add(new FenPeiFragment());
        mFragments.add(new PaoFenFragment());
        tablayout.setViewPager(viewPager, strings, this, mFragments);
        super.initView(savedInstanceState);
    }
}
